package com.ytkj.digitalConstruction.dao.assets;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.ytkj.digitalConstruction.entity.assets.Vehicle;
import com.ytkj.digitalConstruction.httpbean.assets.resbean.ResVehicle;

/**
 * 车辆管理Mapper
 * 
 * @author 常广州
 *
 */
@Mapper
public interface VehicleMapper {
	/**
	 * 增加车辆操作
	 * 
	 * @param record
	 * @return
	 */
	int insertSelective(Vehicle record);

	/**
	 * 查询车辆操作
	 * 
	 * @param record
	 * @return
	 */
	Vehicle selectByPrimaryKey(Integer vehicleId);

	/**
	 * 删除车辆操作
	 * 
	 * @param vehicleId
	 * @return
	 */
	int deleteByIdPrimaryKey(Integer id);

	/**
	 * 修改车辆操作
	 * 
	 * @param record
	 * @return
	 */
	int updateByPrimaryKey(Vehicle record);

	/**
	 * 根据车牌号查询车辆
	 * 
	 * @param plate_number
	 * @return
	 */
	Vehicle selectByPlateNumberPrimaryKey(String deviceName);

	/**
	 * 查询所有未删除设备
	 * 
	 * @return
	 */
	List<ResVehicle> selectAll();

	/**
	 * 根据项目id分页查询车辆信息
	 * 
	 * @param projectIds
	 * @return
	 */
	List<ResVehicle> selectAllPageable(List<Integer> projectIds);

	int deleteByPrimaryKey(Integer id);

	int insert(Vehicle record);

	int updateByPrimaryKeySelective(Vehicle record);

	/**
	 * 根据项目查找车辆
	 * 
	 * @param projectId
	 * @return
	 */
	List<ResVehicle> selectByProject(int projectId);

	/**
	 * 根据绑定设备查找车辆
	 * 
	 * @param bindDevice
	 * @return
	 */
	List<ResVehicle> selectByBindDevice(Integer bindDevice);

	/**
	 * 根据车辆id查询车辆信息
	 * 
	 * @param vehicleId
	 * @return
	 */
	ResVehicle selectByVehicleId(int vehicleId);

}